# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo do
  @moduledoc """
  Information of a device that runs a Chrome browser profile.

  ## Attributes

  *   `affiliatedDeviceId` (*type:* `String.t`, *default:* `nil`) - Output only. Device ID that identifies the affiliated device on which the profile exists. If the device type is CHROME_BROWSER, then this represents a unique Directory API ID of the device that can be used in Admin SDK Browsers API.
  *   `deviceType` (*type:* `String.t`, *default:* `nil`) - Output only. Type of the device on which the profile exists.
  *   `hostname` (*type:* `String.t`, *default:* `nil`) - Output only. Hostname of the device on which the profile exists.
  *   `machine` (*type:* `String.t`, *default:* `nil`) - Output only. Machine name of the device on which the profile exists. On platforms which do not report the machine name (currently iOS and Android) this is instead set to the browser's device_id - but note that this is a different device_id than the |affiliated_device_id|.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :affiliatedDeviceId => String.t() | nil,
          :deviceType => String.t() | nil,
          :hostname => String.t() | nil,
          :machine => String.t() | nil
        }

  field(:affiliatedDeviceId)
  field(:deviceType)
  field(:hostname)
  field(:machine)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementVersionsV1DeviceInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
